package Salesman;

import java.util.List;

public abstract class AbstractStep {

    public abstract List<City> getCities();

    @Override
    public abstract String toString();

    public String routeToString() {
        String s = "";
        if (!getCities().isEmpty()) {
            s += getCities().get(0).getShortName();
        }

        if (getCities().size() > 1) {
            for (int i = 1; i < getCities().size(); i++) {
                s += "->" + getCities().get(i).getShortName();
            }
        }
        return s;
    }
}
